package leecode

import "fmt"

func Rotate(nums []int, k int) {
	copyNums := make([]int, len(nums), len(nums))
	for index, value := range nums {
		copyNums[(index+k)%len(nums)] = value
	}
	copy(nums, copyNums)
	fmt.Print(nums)
}
